hip.util.reflection

Undocumented in source.

Members

Aliases

Parameters
alias Parameters = getParams
Undocumented in source.

Enums

hasModule
eponymoustemplate hasModule(string modulePath)
Undocumented in source.
hasType
eponymoustemplate hasType(string TypeName)
Undocumented in source.

Functions

ForwardFunc
string ForwardFunc()

Private to forward interface

ForwardInterface
string ForwardInterface()

This function receives a string containing the member name which implements the interface I.

GenerateGetterSettersInterfaceImpl
void GenerateGetterSettersInterfaceImpl()
Undocumented in source. Be warned that the author may not have intended to support it.
asInt
int asInt()
Undocumented in source. Be warned that the author may not have intended to support it.
attributes
string attributes()
Undocumented in source. Be warned that the author may not have intended to support it.
enumLength
size_t enumLength()
Undocumented in source. Be warned that the author may not have intended to support it.
inverseLookup
auto inverseLookup()
Undocumented in source. Be warned that the author may not have intended to support it.
isLiteral
bool isLiteral(string var)
Undocumented in source. Be warned that the author may not have intended to support it.
isMethodImplemented
bool isMethodImplemented()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeArrayOf
bool isTypeArrayOf()

Used when wanting to represent any struct compatible with a static array.

nullCheck
T nullCheck(T defaultValue, Q target)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixin templates

ExportDFunctions
mixintemplate ExportDFunctions(alias mod)

Iterates through a module and generates export function declaration for each @ExportD function found on it. If the class itself is @ExportD, it will create a method new(ClassName) to be exported too

ExportDFunctionsImpl
mixintemplate ExportDFunctionsImpl(string className, Class)

Intermediary step for getting an alias to the Class type

ForwardInterface2
mixintemplate ForwardInterface2(string member, I)
Undocumented in source.
GenerateGettersSettersInterface
mixintemplate GenerateGettersSettersInterface(interface_)

Generates getter and setter for given interface. - Final methods are excluded. - void return types are excluded - const methods will only generate the const getter

GenerateRuntimeAccessors
mixintemplate GenerateRuntimeAccessors()

This mixin is able to generate runtime accessors. That means that by having a string, it is possible to modify

HipExportDFunctions
mixintemplate HipExportDFunctions(alias mod)

Iterates through a module and generates export function declaration for each @ExportD function found on it. If the class itself is @ExportD, it will create a method new(ClassName) to be exported too * The difference with HipExportDFunctions is that it does not generate * Static method output when not in script version.

HipExportDFunctionsImpl
mixintemplate HipExportDFunctionsImpl(string className, Class)

Intermediary step for getting an alias to the Class type The difference with HipExportDFunctionsImpl is that it does not generate Static method output when not in script version.

MultiInherit
mixintemplate MultiInherit(I)
Undocumented in source.

Structs

ExportD
struct ExportD

Used on: - Static Methods - Class Names Used in conjunction to ExportDFunctions. You may specify a suffix, if you so, _suffix is added ExportD will do nothing to static methods when building release. However, it will still produce a function for returning a new class.

Version
struct Version
Undocumented in source.

Templates

aaToSwitch
template aaToSwitch(alias aa, bool reverse = false)

Generates a function that executes a switch case from the associative array.

generateExportConstructor
template generateExportConstructor(ClassT, string className)

ClassT, Ctor, string className This class MUST have an interface, because it will bug out when calling the function with need opCmp for class

generateExportFunc
template generateExportFunc(string className, alias funcSymbol)

It will create a export extern(System) function, thus, making it a C callable code. This function comes from a static method, and has special code injection for making the GC not collect if it is an object

generateExportName
template generateExportName(string className, alias funcSymbol)

Will basically generate an export name such as className_funcSymbol If it has ExportD with a suffix, it will be basically className_funcSymbol(suffix)

getParams
template getParams(alias fn)
Undocumented in source.
getUDAs
template getUDAs(alias symbol)
Undocumented in source.
hasMethod
template hasMethod(T, string method, Params...)
Undocumented in source.
hasOverload
template hasOverload(T, string member, OverloadType)
Undocumented in source.
hasUDA
template hasUDA(alias symbol, alias UDA)
Undocumented in source.
isEnum
template isEnum(alias s)
Undocumented in source.
isFunction
template isFunction(X...)

Copy pasted from std.traits for not importing too many things

isReference
template isReference(T)
Undocumented in source.

Meta